#include "Klass.h"
#include "Student.h"
#include "Person.h"
#include <string>

using namespace std;

Klass::Klass(size_t number):number(number){

}

std::string operator+(const std::string &lhs, const Klass &klass){
    return lhs + to_string(klass.number);
}

bool Klass::operator==(const Klass &klass) {
    return klass.number == this->number;
}

void Klass::AssignLeader(Student &student){
    this->leader = &student;
}

bool Klass::HasLeader(Student &student)
{
    // return this->leader != nullptr && (*(Person *)(this->leader) == *(Person *)&student);
    return this->leader != nullptr && student == * (this->leader);
    // return this->leader != nullptr && student.IsEqual(* (this->leader));
}
